/**
 * 
 */
package com.game.biz;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.handler.chain.IoHandlerCommand;

import com.game.log.LogEvent;
import com.game.log.LogType;
import com.game.request.BaseRequest;

/**
 * @author lushouzhi
 * 
 */
public class GameBizHandlerCommand implements IoHandlerCommand {

	@Override
	public void execute(NextCommand nextCommand, IoSession session,
			Object message) throws Exception {
		BaseRequest request = (BaseRequest) message;
		GameBiz gameBiz=GameBizMap.lookup(request.getGameType());
		if(gameBiz==null){
			LogEvent.info("no game biz found in GameBizMap", LogType.EXCEPTION);
			return;
		}
		gameBiz.doBiz(session, request);
	}

}
